#pragma once

#include "dbcDefine.h"


LIBDBC_BEGIN_NAMESPACE

class IResultSetMetaData;

class IResultSet
{
public:
	IResultSet() { };
	virtual ~IResultSet() { };

	virtual bool next() = 0;
	virtual unsigned int getColumnCount() = 0;

	virtual int getInt(int field) = 0;
	virtual long getLong(int field) = 0;
	virtual double getDouble(int field) = 0;
	virtual char* getString(int field, char* buffer, int len) = 0;

	virtual bool getInt(int field, int* pValue) = 0;
	virtual bool getLong(int field, long* pValue) = 0;
	virtual bool getDouble(int field, double* pValue) = 0;
	virtual bool getStringExt(int field, char* buffer, int len) = 0;

	virtual bool getBinaryLength(int field, unsigned long* len) = 0;
	virtual bool getBinary(int field, unsigned char* pBuffer, int buflen) = 0;

	virtual IResultSetMetaData* getResultSetMetaData() = 0;

	virtual int getLastErrorCode() = 0;


};


LIBDBC_END_NAMESPACE